import 'package:dio/dio.dart';
import 'package:rabbit/models/home_models.dart';
import 'package:rabbit/services/request.dart';

class HomeAPI {
  // 获取首页数据的接口方法
  static Future<HomeModel> homeFetch() async {
    Response response =
        await SokachRequest().handldeRequest('/home/index', 'get');

    dynamic res = response.data['result'];

    HomeModel homeModel = HomeModel.fromJson(res);
    return homeModel;
  }
}
